<template>
    <el-table :data="logData" border style="width: 100%">
        <el-table-column prop="username" label="登入账户" width="250" center />
        <el-table-column prop="lastLogin.ip" label="上次登入ip" width="250" />
        <el-table-column prop="lastLogin.loginTime" label="上次登入时间" width="250" sortable default-sort />
        <el-table-column prop="nowLogin.ip" label="本次登入ip" width="250" />
        <el-table-column prop="nowLogin.loginTime" label="本次登入时间" />
    </el-table>
</template>
<script>
import * as api from "@/api/loginLog"
export default {
    data() {
        return {
            logData: [],
        }
    },
    meta: {
        title: "glsy",
        name: "管理首页",
        icon: "iconfont icon-shouye",
    },
    created() {
        this.getLog(2, 10)
    },
    methods: {
        getLog(page, count) {
            api.loginLog(page, count).then(res => {
                console.log(res)
                this.logData = res.data.data
            })
        },
    },
}
</script>

<style lang="less" scoped>
/deep/ .cell {
    text-align: center;
}
</style>